home *** CD-ROM | disk | FTP | other *** search
/ MacGames Sampler / PHT MacGames Bundle.iso / MacSource Folder / Samples from the CD / Assembly / Mac68k / MANUAL / MAN4.DOC < prev    next >
Encoding:
Text File  |  1985-08-20  |  11.5 KB  |  392 lines  |  [TEXT/Anon]

  1.  
  2.                                                                 MAC.68K
  3.  
  4.  
  5.  
  6.  
  7.  
  8. VIII.  RESOURCES REQUIRED
  9. VIII.  RESOURCES REQUIRED
  10. VIII.  RESOURCES REQUIRED
  11.  
  12.  
  13.  
  14.  
  15.       MAC.68K resides on one 34K byte file. It requires file MLOAD
  16.  
  17.  
  18.   to be present if an application object file is to be generated.
  19.  
  20.  
  21.  
  22.       MAC.68K does require disk space while it executes. It is a
  23.  
  24.  
  25.   two pass assembler, but instead of reading the same source data
  26.  
  27.  
  28.   for each pass it creates a temporary file during pass one that
  29.  
  30.  
  31.   contains all the source lines to be processed by pass two. This
  32.  
  33.  
  34.   temporary file will require .8 to 1.4 times the size of the input
  35.  
  36.  
  37.   source file plus any included text files.  MAC.68K will try to
  38.  
  39.  
  40.   fit this file into memory, so for small programs or on large
  41.  
  42.  
  43.   memory size machines this disk space may not be required.
  44.  
  45.  
  46.  
  47.       INCLUDE files are loaded in entirety into memory prior to
  48.  
  49.  
  50.   being processed.  Included text file sizes of 10K to 20K on a
  51.  
  52.  
  53.   128K Macintosh should pose no problems. If you get a memory full
  54.  
  55.  
  56.   diagnostic on an include file, one solution is to split the file
  57.  
  58.  
  59.   and use two INCLUDE statements.
  60.  
  61.  
  62.  
  63.       For programmers writing very large programs, the following
  64.  
  65.  
  66.   dynamic table sizes can be added to the static size of 52K to
  67.  
  68.  
  69.   approximate the memory required for assembly.
  70.  
  71.  
  72.  
  73.       TABLE          Required in                Size
  74.  
  75.  
  76.  
  77.   SYMBOL             Pass 1   Pass 2       16 bytes per symbol
  78.  
  79.  
  80.   Macro names        Pass 1   Pass 2       16 bytes per name
  81.  
  82.  
  83.   Macro definition   Pass 1                Size of macro text
  84.  
  85.  
  86.   Object code                 Pass 2       Size of program
  87.  
  88.  
  89.   Relocation bits             Pass 2       Size of program
  90.  
  91.  
  92.   (if .O generated)
  93.  
  94.  
  95.  
  96.  
  97.       As an example of a moderate to large size program, MAC.68K
  98.  
  99.  
  100.   requires 104K to assemble itself. That includes 270K of source
  101.  
  102.  
  103.   data in 14 text files, two INCLUDES files, three INCLUDEH files,
  104.  
  105.  
  106.   2500 symbols, and 20 macro definitions.
  107.  
  108.  
  109.  
  110.  
  111.  
  112.  
  113.  
  114.  
  115.  
  116.  
  117.  
  118.  
  119.  
  120.  
  121.  
  122.  
  123.  
  124.  
  125.  
  126.  
  127.  
  128.  
  129. MAC.68K                                  -14-
  130.  
  131.  
  132.  
  133. MAC.68K
  134.  
  135.  
  136.  
  137.  
  138.  
  139. IX.  STATISTIC AND ERROR MESSAGES
  140. IX.  STATISTIC AND ERROR MESSAGES
  141. IX.  STATISTIC AND ERROR MESSAGES
  142.  
  143.  
  144.  
  145.  
  146.       All MAC.68K statistic and error messages are displayed on the
  147.  
  148.  
  149.   console.  The first message issued by MAC.68K is its copyright
  150.  
  151.  
  152.   and the version number.
  153.  
  154.  
  155.  
  156.  
  157.   IX.1 Errors Detected In The Command Line
  158.   IX.1 Errors Detected In The Command Line
  159.   IX.1 Errors Detected In The Command Line
  160.  
  161.  
  162.  
  163.  
  164.       The following errors are detected at call time.  All are
  165.  
  166.  
  167.   considered fatal and will terminate the assembly. Check section I
  168.  
  169.  
  170.   for the valid command line options and syntax.
  171.  
  172.  
  173.  
  174.  
  175.   *UNKNOWN OPTION IN COMMAND LINE*
  176.  
  177.  
  178.             An unknown option character followed a dash character.
  179.  
  180.  
  181.  
  182.   *SYNTAX ERROR IN COMMAND LINE*
  183.  
  184.  
  185.             An illegal character or character sequence was detected.
  186.  
  187.  
  188.  
  189.   *ILLEGAL FILE NAME IN COMMAND LINE*
  190.  
  191.  
  192.             An invalid file specification was given.
  193.  
  194.  
  195.  
  196.   *NO INPUT FILE NAME IN COMMAND LINE*
  197.  
  198.  
  199.             The input file is a required parameter.
  200.  
  201.  
  202.  
  203.   *ILLEGAL DRIVE SPECIFICATION IN COMMAND LINE*
  204.  
  205.  
  206.             A drive number other than A-P was specified on a
  207.  
  208.  
  209.             file name or -F command.
  210.  
  211.  
  212.  
  213.  
  214.   IX.2 Initialization Errors
  215.   IX.2 Initialization Errors
  216.   IX.2 Initialization Errors
  217.  
  218.  
  219.  
  220.  
  221.       The following are detected during MAC.68K initialization. All
  222.  
  223.  
  224.   are considered fatal and assembly is terminated.
  225.  
  226.  
  227.  
  228.  
  229.   *UNABLE TO OPEN INPUT FILE*
  230.  
  231.  
  232.             The input file name from the command line does not exist
  233.  
  234.  
  235.             or is unaccessable.
  236.  
  237.  
  238.  
  239.   *UNABLE TO OPEN OUTPUT FILE*
  240.  
  241.  
  242.             MAC.68K was unable to open the output file specified on
  243.  
  244.  
  245.             the command line. Possible errors include: drive
  246.  
  247.  
  248.             specified does not exist or is not online, disk is
  249.  
  250.  
  251.             full, directory is full.
  252.  
  253.  
  254.  
  255.   *STACK OVERFLOW*
  256.  
  257.  
  258.             The TPA size is too small for MAC.68K. See section VIII
  259.  
  260.  
  261.             for minimum memory sizes.
  262.  
  263.  
  264.  
  265.  
  266.  
  267.  
  268.  
  269.  
  270.                               -15-                              MAC.68K
  271.  
  272.  
  273.  
  274.                                                                 MAC.68K
  275.  
  276.  
  277.  
  278.  
  279.  
  280.   IX.3 Pass One Messages
  281.   IX.3 Pass One Messages
  282.   IX.3 Pass One Messages
  283.  
  284.  
  285.  
  286.  
  287.       MAC.68K reports no assembly errors during pass one. MAC.68K
  288.  
  289.  
  290.   displays the informative message *LOADING filename* at the
  291.  
  292.  
  293.   current cursor line while it is reading any of the include type
  294.  
  295.  
  296.   files. At the end of pass one and prior to pass two, MAC.68K
  297.  
  298.  
  299.   issues three statistic messages;  the count of source lines read,
  300.  
  301.  
  302.   the count of source lines written to the intermediate file for
  303.  
  304.  
  305.   pass two processing, and the count of M68000 operation and data
  306.  
  307.  
  308.   source lines.
  309.  
  310.  
  311.  
  312.       The fatal errors causing termination in pass one are disk
  313.  
  314.  
  315.   full while writing the intermediate file, symbol table full and
  316.  
  317.  
  318.   memory overflow.  The following messages result:
  319.  
  320.  
  321.  
  322.   *DISK FULL*
  323.  
  324.  
  325.             See section VIII to determine size requirements for the
  326.  
  327.  
  328.             intermediate file. Delete some files from the default
  329.  
  330.  
  331.             disk or use the command line option -F to place the
  332.  
  333.  
  334.             intermediate file on a disk with sufficient space.
  335.  
  336.  
  337.  
  338.   *SYMBOL TABLE OVERFLOW*
  339.  
  340.  
  341.             MAC.68K will handle at least 4200 symbols if enough
  342.  
  343.  
  344.             memory is available. To handle more you must split
  345.  
  346.  
  347.             your program into separate load modules.
  348.  
  349.  
  350.  
  351.   *PASS ONE TABLE OVERFLOW*
  352.  
  353.  
  354.             See section VIII to determine pass one table space
  355.  
  356.  
  357.             requirements. Your program may be too large for the
  358.  
  359.  
  360.             available memory, an INCLUDE file may be too large to
  361.  
  362.  
  363.             fit in available memory, or you may have an unintended
  364.  
  365.  
  366.             recursion with MACRO, DUP, or INCLUDE that has filled
  367.  
  368.  
  369.             up table space before hitting the MAC.68K recursion
  370.  
  371.  
  372.             limit.
  373.  
  374.  
  375.  
  376.  
  377.   IX.4 Pass Two Messages
  378.   IX.4 Pass Two Messages
  379.   IX.4 Pass Two Messages
  380.  
  381.  
  382.  
  383.  
  384.   *OBJECT CODE TOO LARGE*
  385.  
  386.  
  387.             The size of the resulting .68K file is too large
  388.  
  389.  
  390.             to generate in the available memory space. The assembly
  391.  
  392.  
  393.             will continue but no object file will be generated.
  394.  
  395.  
  396.  
  397.   *DISK FULL - OBJECT FILE*
  398.  
  399.  
  400.             Too little room on the disk or directory to write the
  401.  
  402.  
  403.             object file. The assembly will continue but no object
  404.  
  405.  
  406.             file will be generated.
  407.  
  408.  
  409.  
  410.  
  411.  
  412.  
  413.  
  414.  
  415.  
  416.  
  417.  
  418.  
  419. MAC.68K                                  -16-
  420.  
  421.  
  422.  
  423. MAC.68K
  424.  
  425.  
  426.  
  427.  
  428.  
  429.   *DISK FULL - PRINT FILE*
  430.  
  431.  
  432.             Too little room on the disk or directory to write the
  433.  
  434.  
  435.             print file. The assembly will continue but the print
  436.  
  437.  
  438.             file will remain truncated.
  439.  
  440.  
  441.  
  442.  
  443.       During pass two MAC.68K will display IDENT and END cards on
  444.  
  445.  
  446.   the console.  If the operator has not enabled list generation, or
  447.  
  448.  
  449.   if the listing is not being sent to the console, any line
  450.  
  451.  
  452.   containing assembly errors, complete with error column pointers,
  453.  
  454.  
  455.   will also be displayed.  Unless the NOPAWS option is selected,
  456.  
  457.  
  458.   MAC.68K will pause when the screen is filled with error messages,
  459.  
  460.  
  461.   and wait for operator input before continuing.  If any errors
  462.  
  463.  
  464.   have been detected, MAC.68K will list an error directory after
  465.  
  466.  
  467.   the END card but before the symbol/cross reference table.  The
  468.  
  469.  
  470.   error directory will contain a one line description for each
  471.  
  472.  
  473.   unique error type encountered.
  474.  
  475.  
  476.  
  477.       If a source line contains an error(s), the error type is
  478.  
  479.  
  480.   flagged in the output listing with single character flags
  481.  
  482.  
  483.   starting in the leftmost position of the source listing. Numeric
  484.  
  485.  
  486.   error flags indicate a "nonfatal" error that did not prevent
  487.  
  488.  
  489.   complete processing of the line. Alphabetic error flags indicate
  490.  
  491.  
  492.   a "fatal" error that resulted in no processing or in partial
  493.  
  494.  
  495.   processing of the source line.
  496.  
  497.  
  498.  
  499.       A one line text description of each error code type
  500.  
  501.  
  502.   encountered in the assembly will be printed at the end of the
  503.  
  504.  
  505.   program.
  506.  
  507.  
  508.  
  509.  
  510.            Source Line Error Flags
  511.  
  512.  
  513.  
  514.   Type         Description  (See Appendix B for detailed descriptions)
  515.  
  516.  
  517.  
  518.   A            Address Field Error.
  519.  
  520.  
  521.  
  522.   D            Doubly Defined Symbol.
  523.  
  524.  
  525.  
  526.   E            INCLUDE, RMT, or MACRO was illegally nested.
  527.  
  528.  
  529.  
  530.   F            File Content Error.
  531.  
  532.  
  533.  
  534.   G            Op Code not allowed.
  535.  
  536.  
  537.  
  538.   L            Location Field Bad.
  539.  
  540.  
  541.  
  542.   M            Invalid M68000 Addressing Mode.
  543.  
  544.  
  545.  
  546.   N            File Name Error.
  547.  
  548.  
  549.  
  550.   O            Operation Field Bad.
  551.  
  552.  
  553.  
  554.   P            User Requested Error.
  555.  
  556.  
  557.  
  558.   R            Relocation Error.
  559.  
  560.  
  561.  
  562.  
  563.  
  564.                               -17-                              MAC.68K
  565.  
  566.  
  567.  
  568.                                                                 MAC.68K
  569.  
  570.  
  571.  
  572.  
  573.  
  574.   U            Undefined Symbol.
  575.  
  576.  
  577.  
  578.   V            VFD Bit Count Error.
  579.  
  580.  
  581.  
  582.   X            File Not Found.
  583.  
  584.  
  585.  
  586.   Z            Zero Division.
  587.  
  588.  
  589.  
  590.   1            Location Field Bad.
  591.  
  592.  
  593.  
  594.   2            Address Error on Symbol Definition.
  595.  
  596.  
  597.  
  598.   3            Duplicate Macro Definition.
  599.  
  600.  
  601.  
  602.   4            Bad Formal Parameter Name.
  603.  
  604.  
  605.  
  606.   7            Address Value Exceeds Field Size.
  607.  
  608.  
  609.  
  610.   8            Missing or Extra Operation Subfield.
  611.  
  612.  
  613.  
  614.   9            String Substitution Error.
  615.  
  616.  
  617.  
  618.  
  619.  
  620.  
  621.  
  622.  
  623.   IX.5 Completion Messages
  624.   IX.5 Completion Messages
  625.   IX.5 Completion Messages
  626.  
  627.  
  628.  
  629.  
  630.   *NO OBJECT FILE GENERATED*
  631.  
  632.  
  633.                Either OPTION NOOBJ was selected or the object file
  634.  
  635.  
  636.                was too large.
  637.  
  638.  
  639.  
  640.   *ASSEMBLY ERRORS*
  641.  
  642.  
  643.                The assembly is finished, but at least one error was
  644.  
  645.  
  646.                detected.
  647.  
  648.  
  649.  
  650.   *ASSEMBLY COMPLETE*
  651.  
  652.  
  653.                The assembly finished with no errors.
  654.  
  655.  
  656.  
  657.  
  658.  
  659.  
  660.  
  661.  
  662.  
  663.  
  664.  
  665.  
  666.  
  667.  
  668.  
  669.  
  670.  
  671.  
  672.  
  673.  
  674.  
  675. MAC.68K                                  -18-
  676.  
  677.  
  678.  
  679. MAC.68K
  680.  
  681.  
  682.  
  683.  
  684.  
  685. X.  PSEUDO OPERATIONS
  686. X.  PSEUDO OPERATIONS
  687. X.  PSEUDO OPERATIONS
  688.  
  689.  
  690.  
  691.  
  692.       In addition to operation codes that generate machine language
  693.  
  694.  
  695.   object code, most assemblers provide additional operation codes
  696.  
  697.  
  698.   to generate data, reserve storage, define macros, provide program
  699.  
  700.  
  701.   list control, and other assembler support functions. Because
  702.  
  703.  
  704.   these additional operations do not directly generate machine code
  705.  
  706.  
  707.   they are known as pseudo operation codes, or pseudo ops. The
  708.  
  709.  
  710.   names of the pseudo ops provided by MAC.68K and grouped by
  711.  
  712.  
  713.   general function follow.
  714.  
  715.  
  716.  
  717.  
  718.   Data               DC.B      DS.B      VFD
  719.  
  720.  
  721.                      DC        DS
  722.  
  723.  
  724.                      DC.L      DS.L
  725.  
  726.  
  727.  
  728.   Control            IDENT     ORG       EVEN
  729.  
  730.  
  731.                      END       LOC
  732.  
  733.  
  734.  
  735.   Macro and          MACRO     LOCAL     DUP       STOPDUP
  736.  
  737.  
  738.   Code Generation    MACROL    PURGE     ECHO
  739.  
  740.  
  741.                      ENDM      OPSYN     ENDD
  742.  
  743.  
  744.  
  745.   Listing            LIST      TITLE     PAGE
  746.  
  747.  
  748.                                SUBTTL    SPACE
  749.  
  750.  
  751.  
  752.   Conditional        IF        ELSE      IFC
  753.  
  754.  
  755.                      IFS       ENDC      IFNC
  756.  
  757.  
  758.                      IFxx
  759.  
  760.  
  761.  
  762.   Symbol             SET       MAX       QUAL      NOREF
  763.  
  764.  
  765.                      EQU       MIN
  766.  
  767.  
  768.  
  769.   Misc               STRING    STRDEC    DEFER     ERRxx
  770.  
  771.  
  772.                      STRLEN    STRHEX    HERE
  773.  
  774.  
  775.  
  776.   Initialization     OPTION    PAGE
  777.  
  778.  
  779.  
  780.   Modularization     INCLUDES  MODULE    STEXT
  781.  
  782.  
  783.                      INCLUDEH  ENTRY
  784.  
  785.  
  786.                      INCLUDE
  787.  
  788.  
  789.  
  790.   Segment            BSS       OFFSET    TEXT
  791.  
  792.  
  793.                      DATA      SECTION
  794.  
  795.  
  796.  
  797.   Loader (CPM)       GLOBL     COMM
  798.  
  799.  
  800.  
  801.  
  802.  
  803.  
  804.  
  805.  
  806.  
  807.  
  808.  
  809.  
  810.  
  811.  
  812.                               -19-                              MAC.68K
  813.  
  814.  
  815. PM)       GLOBL     COMM
  816.  
  817.  
  818.  
  819.  
  820.  
  821.  
  822.  
  823.  
  824.  
  825.  
  826.  
  827.  
  828.  
  829.  
  830.